package com.example.springbootpreviewurls.controller;
import com.example.springbootpreviewurls.common.cadToPdf;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;

@RestController
@RequestMapping ("/DwgToPDf")
public class PreviewUrl {

    @GetMapping("")
    public String previewUrl() throws IOException, InterruptedException {
        String inputFilePath = "C:/Users/zcw/Desktop/test2.dwg";
        String outputFilePath = "C:/Users/zcw/Desktop/test2.pdf";
        cadToPdf cadToPdf = new cadToPdf();
        cadToPdf.cadToPdf(inputFilePath, outputFilePath);
        return "success";
    }
}
